<template>
  <div class="exhibitor-detail">
    <!-- 页面头部 -->
    <div class="page-header" v-if="exhibitor">
      <div class="container">
        <div class="header-content">
          <div class="exhibitor-logo">
            <img
              :src="exhibitor.logoUrl"
              :alt="exhibitor.companyName"
              v-if="exhibitor.logoUrl"
            />
            <div class="no-logo" v-else>
              {{ exhibitor.companyName?.charAt(0) }}
            </div>
            <div></div>
          </div>
          <div class="exhibitor-basic-info">
            <h1 class="exhibitor-name">{{ exhibitor.companyName }}</h1>
            <p class="exhibitor-category" v-if="exhibitor.industryType">
              {{ exhibitor.industryType }}
            </p>
            <div class="exhibitor-meta">
              <span class="booth-number" v-if="exhibitor.boothNumber"
                >📍 展位号: {{ exhibitor.boothNumber }}</span
              >
              <span class="exhibitor-country" v-if="exhibitor.country"
                >🌍 {{ exhibitor.country }}</span
              >
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="container">
      <!-- 展商详情内容 -->
      <div class="detail-content" v-if="exhibitor">
        <!-- 公司简介和联系信息 - 左右布局 -->
        <div class="content-grid">
          <!-- 左侧公司简介 -->
          <div class="main-content">
            <section class="info-section" v-if="exhibitor.companyDescription">
              <h2 class="section-title">公司简介</h2>
              <div class="section-content">
                <p class="description">{{ exhibitor.companyDescription }}</p>
              </div>
            </section>
          </div>

          <!-- 右侧联系信息 -->
          <div class="sidebar">
            <!-- 联系信息卡片 -->
            <div class="contact-card">
              <h3 class="card-title">联系信息</h3>
              <div class="contact-info">
                <div class="contact-item" v-if="exhibitor.contactPerson">
                  <span class="contact-icon iconfont icon-dianhua"></span>
                  <div class="contact-details">
                    <span class="contact-label">联系人</span>
                    <span class="contact-value">{{
                      exhibitor.contactPerson
                    }}</span>
                  </div>
                </div>
                <div class="contact-item" v-if="exhibitor.contactPhone">
                  <span class="contact-icon iconfont icon-dianhua"></span>
                  <div class="contact-details">
                    <span class="contact-label">联系电话</span>
                    <span class="contact-value">{{
                      exhibitor.contactPhone
                    }}</span>
                  </div>
                </div>
                <div class="contact-item" v-if="exhibitor.contactEmail">
                  <span class="contact-icon iconfont icon-youxiang"></span>
                  <div class="contact-details">
                    <span class="contact-label">邮箱</span>
                    <span class="contact-value">{{
                      exhibitor.contactEmail
                    }}</span>
                  </div>
                </div>
                <div class="contact-item" v-if="exhibitor.companyWebsite">
                  <span class="contact-icon">🌐</span>
                  <div class="contact-details">
                    <span class="contact-label">官网</span>
                    <a
                      :href="exhibitor.companyWebsite"
                      target="_blank"
                      class="contact-value website-link"
                      >{{ exhibitor.companyWebsite }}</a
                    >
                  </div>
                </div>
                <div class="contact-item" v-if="exhibitor.address">
                  <span class="contact-icon iconfont icon-dizhi"></span>
                  <div class="contact-details">
                    <span class="contact-label">地址</span>
                    <span class="contact-value">{{ exhibitor.address }}</span>
                  </div>
                </div>
              </div>
            </div>

            <!-- 展位信息卡片 -->
            <div class="booth-card" v-if="exhibitor.boothNumber">
              <h3 class="card-title">展位信息</h3>
              <div class="booth-info">
                <div class="booth-item" v-if="exhibitor.boothNumber">
                  <span class="booth-label">展位号</span>
                  <span class="booth-value">{{ exhibitor.boothNumber }}</span>
                </div>
                <div class="booth-item" v-if="exhibitor.boothArea">
                  <span class="booth-label">展位面积</span>
                  <span class="booth-value">{{ exhibitor.boothArea }}㎡</span>
                </div>
                <div class="booth-item" v-if="exhibitor.boothType">
                  <span class="booth-label">展位类型</span>
                  <span class="booth-value">{{ exhibitor.boothType }}</span>
                </div>
                <div class="booth-item" v-if="exhibitor.boothLocation">
                  <span class="booth-label">展位位置</span>
                  <span class="booth-value">{{ exhibitor.boothLocation }}</span>
                </div>
              </div>
            </div>
          </div>
        </div>

        <!-- 产品信息展示 - 独立卡片，跨越整个宽度 -->
        <div class="products-section" v-if="exhibitor">
          <section class="info-section">
            <h2 class="section-title">主要产品</h2>
            <div class="section-content">
              <!-- 产品加载状态 -->
              <div v-if="productsLoading" class="products-loading">
                <el-skeleton :rows="3" animated />
              </div>
              <!-- 产品展示 -->
              <div
                v-else-if="featuredProducts.length > 0"
                class="products-showcase"
              >
                <div
                  class="product-showcase-card"
                  v-for="product in featuredProducts"
                  :key="product.id"
                >
                  <div class="product-showcase-image">
                    <img :src="product.image" :alt="product.name" />
                    <div class="product-showcase-overlay">
                      <el-button
                        type="primary"
                        size="small"
                        @click="viewProductDetail(product)"
                      >
                        <el-icon><View /></el-icon>
                        查看详情
                      </el-button>
                    </div>
                  </div>
                  <div class="product-showcase-info">
                    <h4>{{ product.name }}</h4>
                    <p
                      class="product-showcase-desc"
                      v-html="product.description"
                    ></p>
                    <div class="product-showcase-specs">
                      <span
                        v-for="spec in product.keySpecs"
                        :key="spec"
                        class="showcase-spec-tag"
                      >
                        {{ spec }}
                      </span>
                    </div>
                    <div
                      class="product-showcase-price"
                      v-if="product.priceRange"
                    >
                      <span class="price-label">参考价格：</span>
                      <span class="price-value">{{ product.priceRange }}</span>
                    </div>
                  </div>
                </div>
              </div>
              <!-- 暂无产品 -->
              <div v-else class="no-products">
                <el-empty description="暂无产品信息" :image-size="120" />
              </div>
            </div>
          </section>
        </div>

        <!-- 返回按钮 -->
        <div class="back-section">
          <el-button @click="goBack" size="large" class="back-button">
            <el-icon><ArrowLeft /></el-icon>
            返回展品商城
          </el-button>
        </div>

        <!-- 产品详情弹窗 -->
        <el-dialog
          v-model="showProductDialog"
          title="产品详情"
          width="800px"
          :before-close="handleCloseProductDialog"
          class="product-detail-dialog"
        >
          <div v-if="selectedProduct" class="product-detail-content">
            <!-- 产品图片 -->
            <div class="product-detail-image">
              <img :src="selectedProduct.image" :alt="selectedProduct.name" />
            </div>

            <!-- 产品信息 -->
            <div class="product-detail-info">
              <h2 class="product-detail-title">{{ selectedProduct.name }}</h2>

              <div class="product-detail-meta">
                <el-tag
                  type="primary"
                  size="large"
                  class="product-category-tag"
                >
                  {{ selectedProduct.keySpecs[0] || "产品信息" }}
                </el-tag>
                <span class="product-price" v-if="selectedProduct.priceRange">
                  参考价格: {{ selectedProduct.priceRange }}
                </span>
              </div>

              <div class="product-detail-description">
                <h3>产品描述</h3>
                <p v-html="selectedProduct.description"></p>
              </div>

              <!-- 产品规格 -->
              <div
                class="product-specs"
                v-if="
                  selectedProduct.keySpecs &&
                  selectedProduct.keySpecs.length > 0
                "
              >
                <h3>产品特点</h3>
                <div class="specs-tags">
                  <el-tag
                    v-for="spec in selectedProduct.keySpecs"
                    :key="spec"
                    type="info"
                    class="spec-tag"
                  >
                    {{ spec }}
                  </el-tag>
                </div>
              </div>

              <!-- 联系信息 -->
              <div class="product-contact-info" v-if="exhibitor">
                <h3>联系方式</h3>
                <div class="contact-details">
                  <p v-if="exhibitor.contactPerson">
                    <strong>联系人:</strong> {{ exhibitor.contactPerson }}
                  </p>
                  <p v-if="exhibitor.contactPhone">
                    <strong>电话:</strong> {{ exhibitor.contactPhone }}
                  </p>
                  <p v-if="exhibitor.contactEmail">
                    <strong>邮箱:</strong> {{ exhibitor.contactEmail }}
                  </p>
                </div>
              </div>
            </div>
          </div>

          <template #footer>
            <span class="dialog-footer">
              <el-button @click="showProductDialog = false">关闭</el-button>
              <el-button type="primary" @click="handleContactExhibitor"
                >联系展商</el-button
              >
            </span>
          </template>
        </el-dialog>
      </div>

      <!-- 加载状态 -->
      <div class="loading-section" v-else-if="loading">
        <el-skeleton :rows="5" animated />
      </div>

      <!-- 错误状态 -->
      <div class="error-section" v-else-if="error">
        <el-empty description="展商信息加载失败">
          <el-button type="primary" @click="loadExhibitorDetail"
            >重新加载</el-button
          >
        </el-empty>
      </div>
    </div>
  </div>
</template>

<script>
import { ref, onMounted } from "vue";
import { useRoute, useRouter } from "vue-router";
import { ElMessage } from "element-plus";
import { View, ArrowLeft } from "@element-plus/icons-vue";
import { exhibitorApi } from "@/api/user";
import "@/assets/icons/iconfont.css";

export default {
  name: "ExhibitorDetail",
  components: {
    View,
    ArrowLeft,
  },
  setup() {
    const route = useRoute();
    const router = useRouter();

    const exhibitor = ref(null);
    const loading = ref(true);
    const error = ref(false);
    const productsLoading = ref(false);

    // 主要产品展示数据（从API获取）
    const featuredProducts = ref([]);

    // 产品详情弹窗相关
    const showProductDialog = ref(false);
    const selectedProduct = ref(null);

    // 加载展商详情
    const loadExhibitorDetail = async () => {
      try {
        loading.value = true;
        error.value = false;

        const exhibitorId = route.params.id;
        if (!exhibitorId) {
          ElMessage.error("展商ID不能为空");
          router.push("/exhibitors-directory");
          return;
        }

        const response = await exhibitorApi.getExhibitorById(exhibitorId);
        if (response && response.code === "200" && response.data) {
          exhibitor.value = response.data;
          // 加载展商成功后，加载产品列表
          await loadExhibitorProducts(exhibitorId);
        } else {
          ElMessage.error("展商信息不存在");
          error.value = true;
        }
      } catch (err) {
        console.error("加载展商详情失败:", err);
        ElMessage.error("加载展商详情失败");
        error.value = true;
      } finally {
        loading.value = false;
      }
    };

    // 加载展商产品列表
    const loadExhibitorProducts = async (exhibitorId) => {
      try {
        productsLoading.value = true;
        const response = await exhibitorApi.getExhibitorProducts(exhibitorId);
        if (response && response.code === "200" && response.data) {
          // 转换产品数据格式以匹配前端展示需求
          featuredProducts.value = response.data.map((product) => ({
            id: product.id,
            name: product.productName,
            description: product.productDescription || "暂无详细描述",
            image:
              product.productImage ||
              "https://images.unsplash.com/photo-1485827404703-89b55fcc595e?w=400&h=300&fit=crop",
            keySpecs: product.productCategory
              ? [product.productCategory]
              : ["产品信息"],
            priceRange: product.priceRange || "价格面议",
          }));
        } else {
          // 如果没有产品数据，显示空数组
          featuredProducts.value = [];
        }
      } catch (err) {
        console.error("加载展商产品失败:", err);
        // 产品加载失败不影响页面显示，只是产品区域为空
        featuredProducts.value = [];
      } finally {
        productsLoading.value = false;
      }
    };

    // 查看产品详情
    const viewProductDetail = (product) => {
      selectedProduct.value = product;
      showProductDialog.value = true;
    };

    // 关闭产品详情弹窗
    const handleCloseProductDialog = () => {
      showProductDialog.value = false;
      selectedProduct.value = null;
    };

    // 联系展商
    const handleContactExhibitor = () => {
      if (exhibitor.value && exhibitor.value.contactPhone) {
        ElMessage.success(`请联系展商: ${exhibitor.value.contactPhone}`);
      } else if (exhibitor.value && exhibitor.value.contactEmail) {
        ElMessage.success(`请发送邮件至: ${exhibitor.value.contactEmail}`);
      } else {
        ElMessage.info("请通过展位信息联系展商");
      }
    };

    // 返回展商名录
    const goBack = () => {
      router.push("/exhibitors-directory");
    };

    onMounted(() => {
      // 进入页面时强制定位到顶部（公司信息处）
      try {
        window.scrollTo({ top: 0, left: 0, behavior: "auto" });
      } catch (_) {
        window.scrollTo(0, 0);
      }
      loadExhibitorDetail();
    });

    return {
      exhibitor,
      loading,
      error,
      productsLoading,
      featuredProducts,
      showProductDialog,
      selectedProduct,
      loadExhibitorDetail,
      loadExhibitorProducts,
      viewProductDetail,
      handleCloseProductDialog,
      handleContactExhibitor,
      goBack,
    };
  },
};
</script>

<style scoped>
.exhibitor-detail {
  min-height: 100vh;
  background: #f8f9fa;
}

:deep(.resizable-image) {
  max-width: 100% !important;
  height: auto !important;
}
.page-header {
  height: 400px;
  background: linear-gradient(
    195deg,
    var(--e-global-color-a3699a4) 0%,
    var(--e-global-color-5c1ca3d) 100%
  );
  color: white;
  padding: 120px 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  text-align: center;
}

.exhibitor-logo {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.exhibitor-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.no-logo {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: bold;
  border-radius: 20px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.exhibitor-basic-info {
  flex: 1;
  text-align: left;
}

.exhibitor-name {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.exhibitor-category {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 15px;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
}

.exhibitor-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.booth-number,
.exhibitor-country {
  font-size: 1rem;
  opacity: 0.9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.detail-content {
  padding: 40px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 40px;
}

.main-content {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.products-section {
  background: white;
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  margin-top: 30px;
  margin-bottom: 30px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-section {
  margin-bottom: 40px;
}

.info-section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #320063;
  margin-bottom: 20px;
  position: relative;
  padding-left: 20px;
}

.section-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.section-content {
  color: #555;
  line-height: 1.8;
  font-size: 1rem;
}

/* 产品展示样式 */
.products-showcase {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.product-showcase-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 1px solid #f0f0f0;
}

.product-showcase-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-showcase-image {
  position: relative;
  width: 100%;
  padding-bottom: 60%;

  /* height: 200px; */
  overflow: hidden;
}

.product-showcase-image img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-showcase-card:hover .product-showcase-image img {
  transform: scale(1.05);
}

.product-showcase-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-showcase-card:hover .product-showcase-overlay {
  opacity: 1;
}

.product-showcase-info {
  padding: 20px;
}

.product-showcase-info h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

.product-showcase-desc {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-showcase-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.showcase-spec-tag {
  background: rgba(50, 0, 99, 0.1);
  color: #320063;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  border: 1px solid rgba(50, 0, 99, 0.2);
  white-space: nowrap;
}

.product-showcase-price {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.price-label {
  font-size: 0.8rem;
  color: #999;
}

.price-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: #320063;
  margin-left: 5px;
}

.contact-card,
.booth-card {
  background: white;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: #320063;
  margin-bottom: 20px;
  text-align: center;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.contact-icon {
  font-size: 18px;
  color: #667eea;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.contact-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.contact-value {
  font-size: 1rem;
  color: #333;
  font-weight: 600;
}

.website-link {
  color: #667eea;
  text-decoration: none;
  word-break: break-all;
}

.website-link:hover {
  text-decoration: underline;
}

.booth-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booth-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.booth-item:last-child {
  border-bottom: none;
}

.booth-label {
  font-size: 0.9rem;
  color: #666;
  font-weight: 500;
}

.booth-value {
  font-size: 1rem;
  color: var(--e-global-color-title);
  font-weight: 600;
}

.loading-section,
.error-section {
  padding: 60px 0;
  text-align: center;
}

@media (max-width: 768px) {
  .page-header {
    padding: 100px 0;
  }

  .header-content {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }

  .exhibitor-logo {
    width: 100px;
    height: 100px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.8);
  }

  .exhibitor-name {
    font-size: 2rem;
  }

  .exhibitor-basic-info {
    text-align: center;
  }

  .content-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .main-content {
    padding: 20px;
  }

  .products-section {
    padding: 20px;
  }

  /* 产品展示响应式 */
  .products-showcase {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .product-showcase-image {
    height: 180px;
  }

  .product-showcase-info {
    padding: 15px;
  }
}

/* 平板响应式 */
@media (max-width: 992px) and (min-width: 769px) {
  .products-showcase {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .contact-card,
  .booth-card {
    padding: 20px;
  }
}

/* 产品加载状态 */
.products-loading {
  padding: 20px 0;
}

.no-products {
  padding: 40px 0;
  text-align: center;
}

/* 返回按钮样式 */
.back-section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 0;
  margin-top: 20px;
}

.back-button {
  background: linear-gradient(
    135deg,
    var(--e-global-color-a3699a4) 0%,
    var(--e-global-color-5c1ca3d) 100%
  );
  border: none;
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
  transition: all 0.3s ease;
}

.back-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
  background: linear-gradient(
    135deg,
    var(--e-global-color-5c1ca3d) 0%,
    var(--e-global-color-a3699a4) 100%
  );
}

.back-button .el-icon {
  margin-right: 8px;
}

/* 产品详情弹窗样式 */
.product-detail-dialog :deep(.el-dialog__body) {
  padding: 0;
}

.product-detail-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.product-detail-image {
  width: 100%;
  height: 300px;
  border-radius: 12px;
  overflow: hidden;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.product-detail-info {
  padding: 0 20px 20px 20px;
}

.product-detail-title {
  font-size: 24px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
}

.product-detail-meta {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.product-category-tag {
  font-size: 14px;
  padding: 8px 16px;
}

.product-price {
  font-size: 16px;
  font-weight: 600;
  color: #e74c3c;
}

.product-detail-description {
  margin-bottom: 20px;
}

.product-detail-description h3 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 10px;
  border-left: 4px solid #409eff;
  padding-left: 10px;
}

.product-detail-description p {
  line-height: 1.6;
  color: #666;
  font-size: 15px;
}

.product-specs {
  margin-bottom: 20px;
}

.product-specs h3 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 10px;
  border-left: 4px solid #67c23a;
  padding-left: 10px;
}

.specs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-tag {
  font-size: 13px;
  padding: 6px 12px;
}

.product-contact-info h3 {
  font-size: 18px;
  color: #2c3e50;
  margin-bottom: 10px;
  border-left: 4px solid #f56c6c;
  padding-left: 10px;
}

.product-contact-info .contact-details p {
  margin: 8px 0;
  color: #666;
  font-size: 14px;
}

.product-contact-info .contact-details strong {
  color: #2c3e50;
  margin-right: 8px;
}

.dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 产品详情弹窗响应式 */
@media (max-width: 768px) {
  .product-detail-dialog :deep(.el-dialog) {
    width: 95% !important;
    margin: 5vh auto !important;
  }

  .product-detail-image {
    height: 250px;
  }

  .product-detail-title {
    font-size: 20px;
  }

  .product-detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
</style>
